package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SelfBookingSettingsMapper;
import com.ruoyi.system.domain.SelfBookingSettings;
import com.ruoyi.system.service.ISelfBookingSettingsService;

/**
 * 自助预订设置，用于配置用户通过小程序预订的相关规则Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class SelfBookingSettingsServiceImpl implements ISelfBookingSettingsService
{
    @Autowired
    private SelfBookingSettingsMapper selfBookingSettingsMapper;

    /**
     * 通过id查询自助预订设置
     *
     * @param id 自助预订设置，用于配置用户通过小程序预订的相关规则主键
     * @return 自助预订设置，用于配置用户通过小程序预订的相关规则
     */
    @Override
    public SelfBookingSettings selectSelfBookingSettingsById(Long id)
    {
        return selfBookingSettingsMapper.selectSelfBookingSettingsById(id);
    }

    /**
     * 查询自助预订设置列表
     *
     * @param selfBookingSettings 自助预订设置，用于配置用户通过小程序预订的相关规则
     * @return 自助预订设置，用于配置用户通过小程序预订的相关规则
     */
    @Override
    public List<SelfBookingSettings> selectSelfBookingSettingsList(SelfBookingSettings selfBookingSettings)
    {
        return selfBookingSettingsMapper.selectSelfBookingSettingsList(selfBookingSettings);
    }

    /**
     * 新增自助预订设置
     *
     * @param selfBookingSettings 自助预订设置，用于配置用户通过小程序预订的相关规则
     * @return 结果
     */
    @Override
    public int insertSelfBookingSettings(SelfBookingSettings selfBookingSettings)
    {
        return selfBookingSettingsMapper.insertSelfBookingSettings(selfBookingSettings);
    }

    /**
     * 修改自助预订设置
     *
     * @param selfBookingSettings 自助预订设置，用于配置用户通过小程序预订的相关规则
     * @return 结果
     */
    @Override
    public int updateSelfBookingSettings(SelfBookingSettings selfBookingSettings)
    {
        return selfBookingSettingsMapper.updateSelfBookingSettings(selfBookingSettings);
    }

    /**
     * 批量删除自助预订设置
     *
     * @param ids 需要删除的自助预订设置，用于配置用户通过小程序预订的相关规则主键
     * @return 结果
     */
    @Override
    public int deleteSelfBookingSettingsByIds(Long[] ids)
    {
        return selfBookingSettingsMapper.deleteSelfBookingSettingsByIds(ids);
    }

    /**
     * 删除自助预订设置信息
     *
     * @param id 自助预订设置，用于配置用户通过小程序预订的相关规则主键
     * @return 结果
     */
    @Override
    public int deleteSelfBookingSettingsById(Long id)
    {
        return selfBookingSettingsMapper.deleteSelfBookingSettingsById(id);
    }

    /**
     * 通过门店ID查询自助预订设置详情
     *
     * @param storeId 门店ID
     * @return 结果
     */
    @Override
    public SelfBookingSettings selectByStoreId(Long storeId)
    {
    	return selfBookingSettingsMapper.selectByStoreId(storeId);
    }

}
